<a class="fancy" href="<?php echo url_for('attachments/new?owner_id=' . $self->id . '&ownerclass=' . get_class($self) ) ?>"><img src="/images/icons/16/add.png" title="<?php echo __('Add Attachment') ?>"></a>
<div id="listeFichiers">
<?php 
	$q = Doctrine::getTable('attachment')
		->createQuery('m')
		->where('owner_id= ?',$self->id)
		->andWhere("ownerclass = ?",get_class($self));
	$q->setHydrationMode(Doctrine_Core::HYDRATE_ARRAY);	
	$records =	$q->execute();
	if(count($records) > 0)
	{
		$objectDef = new objectDef('attachment');
		echo $objectDef->renderListTable($records,$module,array('public'),true,false,true);
	}
?>

</div>